package com.baidu.ai.aip.bean;

import java.util.List;

public class GroupGetlistBean implements JsonBean {
    /**
     * error_code : 0
     * error_msg : SUCCESS
     * log_id : 7925359979051
     * timestamp : 1584620433
     * cached : 0
     * result : {"group_id_list":["group_repeat","test","testGroup","testDdd"]}
     */

    private int error_code;
    private String error_msg;
    private long log_id;
    private int timestamp;
    private int cached;
    private ResultBean result;

    public int getError_code() {
        return error_code;
    }

    public void setError_code(int error_code) {
        this.error_code = error_code;
    }

    public String getError_msg() {
        return error_msg;
    }

    public void setError_msg(String error_msg) {
        this.error_msg = error_msg;
    }

    public long getLog_id() {
        return log_id;
    }

    public void setLog_id(long log_id) {
        this.log_id = log_id;
    }

    public int getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(int timestamp) {
        this.timestamp = timestamp;
    }

    public int getCached() {
        return cached;
    }

    public void setCached(int cached) {
        this.cached = cached;
    }

    public ResultBean getResult() {
        return result;
    }

    public void setResult(ResultBean result) {
        this.result = result;
    }

    public static class ResultBean {
        private List<String> group_id_list;

        public List<String> getGroup_id_list() {
            return group_id_list;
        }

        public void setGroup_id_list(List<String> group_id_list) {
            this.group_id_list = group_id_list;
        }
    }

    public String getListForSearch(){
        List<String> list = getResult().getGroup_id_list();
        String str = "default" ;
        for (String iStr: list) {
            str = str + ',' + iStr ;
        }
        return str;
    }
}
